﻿@model Dal.Entities.DocQuestion
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Question</title>
    <link rel="stylesheet" href="/assets/css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/main.css" type="text/css" media="screen" />
</head>
<body style="margin: 0;">
    <div>
        质疑对象:@ViewBag.Description
        <br />
        <br />
        @using (Html.BeginForm("question", "doc", (object)ViewBag.Param, FormMethod.Post, new { @class = "broom_form", id = "form1" }))
        {
            if (ViewBag.Question != null && ViewBag.Question.Count > 0)
            {
            <table width="400" cellspacing="0" cellpadding="0" class="broom_table">
                <thead>
                    <tr>
                        <th width="300">
                            内容
                        </th>
                        <th width="60" class="text_center">
                            创建人
                        </th>
                        <th width="90" class="text_center">
                            创建时间
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var question in (List<Dal.Entities.DocQuestion>)ViewBag.Question)
                    {
                        <tr>
                            <td>
                                @question.QContent
                            </td>
                            <td>
                                @Web.Controllers.Common.GetUserName(question.OperateUserID)
                            </td>
                            <td>
                                @question.OperateTime.ToString("yyyy-MM-dd")
                            </td>
                        </tr>
                    }
                </tbody>
                @if (Web.Controllers.Common.Admin())
                {
                    <tfoot>
                        <tr>
                            <td colspan="2">
                            </td>
                            <td>
                                <input type="submit" name="close" value="关闭质疑">
                            </td>
                        </tr>
                    </tfoot>
                }
            </table>
            }
            <br />
            if (ViewBag.QuestionClose != null && ViewBag.QuestionClose.Count > 0)
            {
            <table width="400" cellspacing="0" cellpadding="0" class="broom_table">
                <tbody>
                    <tr class="odd">
                        <td colspan="3">
                            已关闭的质疑
                        </td>
                    </tr>
                    <tr class="even">
                        <td width="300">
                            内容
                        </td>
                        <td width="60">
                            创建人
                        </td>
                        <td width="90">
                            创建时间
                        </td>
                    </tr>
                    @foreach (var question in (List<Dal.Entities.DocQuestion>)ViewBag.QuestionClose)
                    {
                        <tr>
                            <td>
                                @question.QContent
                            </td>
                            <td>
                                @Web.Controllers.Common.GetUserName(question.OperateUserID)
                            </td>
                            <td>
                                @question.OperateTime.ToString("yyyy-MM-dd")
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            }
            <br />
            if (Web.Controllers.Common.Admin())
            {
            <table class="broom_table">
                <tr class="odd">
                    <td>
                        质疑内容
                    </td>
                    <td>
                        @Html.TextAreaFor(i => i.QContent, 3, 35, null)
                    </td>
                </tr>
                <tr class="even">
                    <td colspan="2">
                        <input type="submit" name="submit" value="提  交">
                    </td>
                </tr>
            </table>
            }
        }
    </div>
</body>
</html>
